
% Matlab/Octave script
% Plotting of scaled temperature "surfaces" - very slow!
% SWH March 2012

close all
clear all


% loads data
Tread;

% create repeating gamma and beta arrays for scatter plot axis
sgamma = zeros(ngamma*nbeta,1);
sbeta = zeros(ngamma*nbeta,1);
for kk=1:nbeta;
   sgamma((kk-1)*ngamma+1:kk*ngamma) = vgamma(:);
   sbeta((kk-1)*ngamma+1:kk*ngamma) = ones(ngamma,1)*vbeta(kk);
end

pl=lbeta;
%style=['red';'green';'blue';'magenta';'cyan';'ro';'go';'bo';'co';'mo'];

%contourf(log(vgamma),log(vbeta),log(T1(:,:,1)))

% Water
figure(1)
view(2)
%for ee = 1:neps
%   eval(sprintf('nstyle=style(%d,:);',ee));
%   eval(sprintf('scatter3(sgamma,sbeta,sT%d(:,3),''%s'');',ee,nstyle));
%   eval(sprintf('scatter3(log(sgamma),log(sbeta),log(sT%d(:,3)));',ee));
surf(log(vgamma),log(vbeta),log(T1(:,:,3)));
hold on
surf(log(vgamma),log(vbeta),log(T2(:,:,3)));
surf(log(vgamma),log(vbeta),log(T3(:,:,3)));
surf(log(vgamma),log(vbeta),log(T4(:,:,3)));
surf(log(vgamma),log(vbeta),log(T5(:,:,3)));
surf(log(vgamma),log(vbeta),log(T6(:,:,3)));
surf(log(vgamma),log(vbeta),log(T7(:,:,3)));
surf(log(vgamma),log(vbeta),log(T8(:,:,3)));
surf(log(vgamma),log(vbeta),log(T9(:,:,3)));
surf(log(vgamma),log(vbeta),log(T10(:,:,3)));
xlabel('\Gamma','fontsize',14);
ylabel('\beta','fontsize',14);
zlabel('\theta_w','fontsize',14);
axis tight
%end
%set(gca, 'xscale', 'log','yscale', 'log','zscale', 'log')

% Phonon
figure(2)
view(2)
%for ee = 1:neps
%   eval(sprintf('nstyle=style(%d,:);',ee));
%   eval(sprintf('scatter3(sgamma,sbeta,sT%d(:,2),''%s'');',ee,nstyle));
%   eval(sprintf('scatter3(sgamma,sbeta,sT%d(:,2));',ee));
surf(log(vgamma),log(vbeta),log(T1(:,:,2)));
hold on
surf(log(vgamma),log(vbeta),log(T2(:,:,2)));
surf(log(vgamma),log(vbeta),log(T3(:,:,2)));
surf(log(vgamma),log(vbeta),log(T4(:,:,2)));
surf(log(vgamma),log(vbeta),log(T5(:,:,2)));
surf(log(vgamma),log(vbeta),log(T6(:,:,2)));
surf(log(vgamma),log(vbeta),log(T7(:,:,2)));
surf(log(vgamma),log(vbeta),log(T8(:,:,2)));
surf(log(vgamma),log(vbeta),log(T9(:,:,2)));
surf(log(vgamma),log(vbeta),log(T10(:,:,2)));
xlabel('\Gamma','fontsize',14);
ylabel('\beta','fontsize',14);
zlabel('\theta_p','fontsize',14);
axis tight
%end
%set(gca, 'xscale', 'log','yscale', 'log','zscale', 'log')


% Electron
figure(3)
%for ee = 1:neps
%   eval(sprintf('nstyle=style(%d,:);',ee));
%   eval(sprintf('scatter3(sgamma,sbeta,sT%d(:,1),''%s'');',ee,nstyle));
%   eval(sprintf('scatter3(sgamma,sbeta,sT%d(:,1));',ee));
surf(log(vgamma),log(vbeta),log(T1(:,:,1)));
view(3)
hold on
surf(log(vgamma),log(vbeta),log(T2(:,:,1)));
surf(log(vgamma),log(vbeta),log(T3(:,:,1)));
surf(log(vgamma),log(vbeta),log(T4(:,:,1)));
surf(log(vgamma),log(vbeta),log(T5(:,:,1)));
surf(log(vgamma),log(vbeta),log(T6(:,:,1)));
surf(log(vgamma),log(vbeta),log(T7(:,:,1)));
surf(log(vgamma),log(vbeta),log(T8(:,:,1)));
surf(log(vgamma),log(vbeta),log(T9(:,:,1)));
surf(log(vgamma),log(vbeta),log(T10(:,:,1)));
xlabel('\Gamma','fontsize',14);
ylabel('\beta','fontsize',14);
zlabel('\theta_e','fontsize',14);
axis tight
%end
%set(gca, 'xscale', 'log','yscale', 'log','zscale', 'log')


 % Water
% for ss=1:yy/pl-1
%     plow=pl*(ss-1)+1;
%     phigh=pl*ss;
%     figure(3);
%     xlabel('\Gamma','fontsize',14);
%     ylabel('\beta','fontsize',14);
%     zlabel('\theta_w','fontsize',14);
%     if raft(plow,5)==raft(leps*0+1,5);
%         scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetaw(plow:phigh,1),'r');
%     elseif raft(plow,5)==raft(leps*1+1,5);
%         scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetaw(plow:phigh,1),'b');
%     elseif raft(plow,5)==raft(leps*2+1,5);
%         scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetaw(plow:phigh,1),'g');
%     elseif raft(plow,5)==raft(leps*3+1,5);
%         scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetaw(plow:phigh,1),'c');
%     elseif raft(plow,5)==raft(leps*4+1,5);
%         scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetaw(plow:phigh,1),'m');
%     end
%     set(gca, 'xscale', 'log','yscale', 'log','zscale', 'log')
%     %axis("tight");
%     %set(gca, 'zscale', 'log')
%     hold on
% end

 % Phonon
% for ss=1:yytot/pl-1
%    plow=pl*(ss-1)+1;
%    phigh=pl*ss;
%    figure(4);
%    xlabel('\Gamma','fontsize',14);
%    ylabel('\beta','fontsize',14);
%    zlabel('\theta_p','fontsize',14);
%    if raft(plow,5)==raft(leps*0+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetap(plow:phigh,1),'r.');
%    elseif raft(plow,5)==raft(leps*1+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetap(plow:phigh,1),'b.');
%    elseif raft(plow,5)==raft(leps*2+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetap(plow:phigh,1),'g.');
%    elseif raft(plow,5)==raft(leps*3+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetap(plow:phigh,1),'c.');
%    elseif raft(plow,5)==raft(leps*4+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetap(plow:phigh,1),'m.');
%    end
%    set(gca, 'xscale', 'log','yscale', 'log','zscale', 'log')
%    axis tight
%    %set(gca, 'zscale', 'log')
%    hold on
%end

 % Electron
% for ss=1:yytot/pl-1
%    plow=pl*(ss-1)+1;
%    phigh=pl*ss;
%    figure(5);
%    xlabel('\Gamma','fontsize',14);
%    ylabel('\beta','fontsize',14);
%    zlabel('\theta_e','fontsize',14);
%    if raft(plow,5)==raft(leps*0+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetae(plow:phigh,1),'r.');
%    elseif raft(plow,5)==raft(leps*1+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetae(plow:phigh,1),'b.');
%    elseif raft(plow,5)==raft(leps*2+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetae(plow:phigh,1),'g.');
%    elseif raft(plow,5)==raft(leps*3+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetae(plow:phigh,1),'c.');
%    elseif raft(plow,5)==raft(leps*4+1,5);
%        scatter3(raft(plow:phigh,7),raft(plow:phigh,6),thetae(plow:phigh,1),'m.');
%    end
%    set(gca, 'xscale', 'log','yscale', 'log','zscale', 'log')
%    axis tight
%    %set(gca, 'zscale', 'log')
%    hold on
%end

